package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbMaliceMailMapper;
import com.ruoyi.system.domain.TbMaliceMail;
import com.ruoyi.system.service.ITbMaliceMailService;

/**
 * 恶意邮件表Service业务层处理
 * 
 * @author 闪电
 * @date 2025-02-20
 */
@Service
public class TbMaliceMailServiceImpl implements ITbMaliceMailService 
{
    @Autowired
    private TbMaliceMailMapper tbMaliceMailMapper;

    /**
     * 查询恶意邮件表
     * 
     * @param emailId 恶意邮件表主键
     * @return 恶意邮件表
     */
    @Override
    public TbMaliceMail selectTbMaliceMailByEmailId(Long emailId)
    {
        return tbMaliceMailMapper.selectTbMaliceMailByEmailId(emailId);
    }

    /**
     * 查询恶意邮件表列表
     * 
     * @param tbMaliceMail 恶意邮件表
     * @return 恶意邮件表
     */
    @Override
    public List<TbMaliceMail> selectTbMaliceMailList(TbMaliceMail tbMaliceMail)
    {
        return tbMaliceMailMapper.selectTbMaliceMailList(tbMaliceMail);
    }

    /**
     * 新增恶意邮件表
     * 
     * @param tbMaliceMail 恶意邮件表
     * @return 结果
     */
    @Override
    public int insertTbMaliceMail(TbMaliceMail tbMaliceMail)
    {
        tbMaliceMail.setCreateTime(DateUtils.getNowDate());
        return tbMaliceMailMapper.insertTbMaliceMail(tbMaliceMail);
    }

    /**
     * 修改恶意邮件表
     * 
     * @param tbMaliceMail 恶意邮件表
     * @return 结果
     */
    @Override
    public int updateTbMaliceMail(TbMaliceMail tbMaliceMail)
    {
        return tbMaliceMailMapper.updateTbMaliceMail(tbMaliceMail);
    }

    /**
     * 批量删除恶意邮件表
     * 
     * @param emailIds 需要删除的恶意邮件表主键
     * @return 结果
     */
    @Override
    public int deleteTbMaliceMailByEmailIds(Long[] emailIds)
    {
        return tbMaliceMailMapper.deleteTbMaliceMailByEmailIds(emailIds);
    }

    /**
     * 删除恶意邮件表信息
     * 
     * @param emailId 恶意邮件表主键
     * @return 结果
     */
    @Override
    public int deleteTbMaliceMailByEmailId(Long emailId)
    {
        return tbMaliceMailMapper.deleteTbMaliceMailByEmailId(emailId);
    }
}
